package com.yfp.operation.service.impl;

import com.yfp.operation.domain.UserAccount;
import com.yfp.operation.mapper.UserAccountMapper;
import com.yfp.operation.service.UserAccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: 用户账户
 * 
 * @CreateDate: 2024/5/28 14:20
 * @UpdateUser: 
 * @UpdateDate: 2024/5/28 14:20
 * @UpdateRemark: 暂无修改
 * @Version: 1.0
 */
@Service
public class UserAccountServiceImpl implements UserAccountService {
    @Autowired
    private UserAccountMapper userAccountMapper;

    /**
     * 查询用户账户
     * @param userId
     * @return
     */
    @Override
    public UserAccount findByUserId(Long userId) {
        return userAccountMapper.getByUserId(userId);
    }

    /**
     * 根据用户Id集合查询
     * @param userIds
     * @return
     */
    @Override
    public List<UserAccount> findByUserIdIn(List<Long> userIds) {
        return userAccountMapper.findByUserIdIn(userIds);
    }

    /**
     * 新增用户账户
     * @param userAccount
     * @return
     */
    @Override
    public void add(UserAccount userAccount) {
        userAccountMapper.add(userAccount);
    }

    /**
     * 编辑用户账号
     * @param userAccount
     */
    @Override
    public void edit(UserAccount userAccount) {
        userAccountMapper.edit(userAccount);
    }

    /**
     * 批量修改
     * @param userAccounts
     */
    @Override
    public void edits(List<UserAccount> userAccounts) {
        userAccountMapper.edits(userAccounts);
    }

    @Override
    public List<UserAccount> findAll() {
        return userAccountMapper.findAll();
    }
}
